package lab02.test09;

public class Student {
    public String number;
    public String classnum;
    public String name;
    public String sex;
    public  int age;

    public Student(){}

    public Student(String number,String classnum,
                   String name,String sex,int age){
        this.number = number;
        this.classnum = classnum;
        this.name = name;
        this.sex = sex;
        this.age = age;
    }

    public void setNumber(String number) {
        this.number = number;
    }

    public String getNumber() {
        return number;
    }

    public void setClassnum(String classnum) {
        this.classnum = classnum;
    }

    public String getClassnum() {
        return classnum;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getSex() {
        return sex;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public int getAge() {
        return age;
    }

    @Override
    public String toString() {
        return "学号："+number+"\n"+
                "班号："+classnum+"\n"+
                "姓名"+name+"\n"+
                "性别"+sex+"\n"+
                "年龄"+age+"\n";
    }
}
